package com.appleword.biz.book.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.appleword.biz.book.mapper.ApplewordArticleMapper;
import com.appleword.biz.book.domain.ApplewordArticle;
import com.appleword.biz.book.service.IApplewordArticleService;

/**
 * 文章Service业务层处理
 * 
 * @author apple
 * @date 2024-05-13
 */
@Service
public class ApplewordArticleServiceImpl implements IApplewordArticleService 
{
    @Autowired
    private ApplewordArticleMapper applewordArticleMapper;

    /**
     * 查询文章
     * 
     * @param id 文章主键
     * @return 文章
     */
    @Override
    public ApplewordArticle selectApplewordArticleById(Long id)
    {
        return applewordArticleMapper.selectApplewordArticleById(id);
    }

    /**
     * 查询文章列表
     * 
     * @param applewordArticle 文章
     * @return 文章
     */
    @Override
    public List<ApplewordArticle> selectApplewordArticleList(ApplewordArticle applewordArticle)
    {
        return applewordArticleMapper.selectApplewordArticleList(applewordArticle);
    }

    /**
     * 新增文章
     * 
     * @param applewordArticle 文章
     * @return 结果
     */
    @Override
    public int insertApplewordArticle(ApplewordArticle applewordArticle)
    {
        return applewordArticleMapper.insertApplewordArticle(applewordArticle);
    }

    /**
     * 修改文章
     * 
     * @param applewordArticle 文章
     * @return 结果
     */
    @Override
    public int updateApplewordArticle(ApplewordArticle applewordArticle)
    {
        return applewordArticleMapper.updateApplewordArticle(applewordArticle);
    }

    /**
     * 批量删除文章
     * 
     * @param ids 需要删除的文章主键
     * @return 结果
     */
    @Override
    public int deleteApplewordArticleByIds(Long[] ids)
    {
        return applewordArticleMapper.deleteApplewordArticleByIds(ids);
    }

    /**
     * 删除文章信息
     * 
     * @param id 文章主键
     * @return 结果
     */
    @Override
    public int deleteApplewordArticleById(Long id)
    {
        return applewordArticleMapper.deleteApplewordArticleById(id);
    }
}